'use strict';

const db = uniCloud.database();
const dbcmd = db.command;
const add_db = db.collection('appointment');
exports.main = async (event, context) => {
	let myDate = new Date();
	let rq = myDate.getFullYear()+'-'+(myDate.getMonth()+1)+'-'+myDate.getDate();
	console.log(rq);
	let res = await add_db.orderBy("yyrq", "asc").orderBy("yysj", "asc")/*.where({
		"yyrq":{"$gte":rq}
	})*/.get();
	return res;
};
